<?php

/**
 * This view helper replaces camelCased things to a specified separator (space
 * by default)
 *
 */
class Zend_View_Helper_CamelCaseToSeparator extends Zend_View_Helper_Abstract
{

    /**
     * This takes a string and replaces camelCasing with specifed separator
     *
     * @param string $value The camelCased string
     * @param string $separator The string to convert the camelCasing to
     * @return string The value with the ordinal suffix appended
     */
    public function camelCaseToSeparator($value, $separator = ' ')
    {
        $filter = new Zend_Filter_Word_CamelCaseToSeparator($separator);
    
        return strtolower($filter->filter($value));
    }
}